Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry pick two changes from upstream 1.3 branch regarding packet buffers. #439

Merged
merged 2 commits into from
May 16, 2024

Conversation

Damian-Nordic
Copy link
Contributor

No description provided.

Matter requires that regular Matter messages fit in IPv6 MTU
of 1280 bytes so the default packet buffer size of 1583 bytes
seems excessively large for some configurations. Especially
that the buffers only hold the UDP payload in the case of
non-LWIP transports.

There are two exceptions to the above though:
1. Minimal mDNS uses the same packet buffer pool and mDNS
   message size is not limited to 1280 bytes, so shrinking
   the buffer size below MTU might have a negative impact
   on the mDNS behavior.
2. Matter allows definining so called large messages that
   can be bigger than 1280 bytes and sent over TCP, but that
   is not implemented yet and will likely require a different
   allocation mechanism.

Signed-off-by: Damian Krolik <[email protected]>
…transmissions (#33334)

On constrained devices, the number of available packet
buffers can be very low. During stress testing a device
that has 8 buffers available, which is the default on
many platforms, it was observed that the device would
receive a lot of parallel read requests and then it
would use all its buffers for responses. The responses
would then be stored in the retransmission table,
awaiting an ACK, but the ACK would never arrive because
of lack of available buffers.

Configure the retransmission table size to be less than
the number of packet buffers to make sure that not all
buffers are held by the retransmission entries, in which
case the device is unable to receive an ACK and hence it
becomes unavailable until any message times out.

Signed-off-by: Damian Krolik <[email protected]>
@Damian-Nordic Damian-Nordic merged commit e7d3cb7 into nrfconnect:master May 16, 2024
11 checks passed
@Damian-Nordic Damian-Nordic deleted the cherry-picks-1.3 branch May 16, 2024 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants